version ?= test
env_version ?= test
pkg_name ?= free-forward

.PHONY: all
build_pkg_name=$(pkg_name):$(version)
env_name=uwsgi-pip:$(env_version)

all:
	docker build . -t $(build_pkg_name)

clean:
	sudo docker rmi $(build_pkg_name)

push:
	sudo docker push $(build_pkg_name)

pip_build:
	docker build . -f ./DockerfilePIP -t $(env_name)

collect_static:
	@echo "1. 先将 setting 中的`STATICFILES_DIRS`注释掉\n" +
		"2. 确定`STATIC_ROOT`存在且正确有效"
	python manage.py collectstatic

pip_freeze:
	pip freeze > requirement.txt

